package com.bawei.product.domain.vo;

import com.bawei.product.domain.req.AttrImageReq;
import com.bawei.product.domain.req.ProductSkuReq;
import com.bawei.product.domain.req.ShopLadderReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@ApiModel(description = "商品详情")
public class ProductInfoVo {

    private Long id;

    @ApiModelProperty(value = "商品类型ID")
    @NotNull(message = "商品类型ID不能为空")
    private Integer productClassifyId;

    @ApiModelProperty(value = "商品名称")
    @NotBlank(message = "商品类型ID不能为空")
    private String productName;

    @ApiModelProperty(value = "副标题")
    private String productSubhead;

    @ApiModelProperty(value = "商品品牌ID")
    private Integer productBrandId;

    @ApiModelProperty(value = "商品介绍")
    private String productIntroduce;

    @ApiModelProperty(value = "商品货号")
    private String productNo;

    @ApiModelProperty(value = "计量单位")
    private String productUnit;

    @ApiModelProperty(value = "商品重量")
    private Double productWeight;

    @ApiModelProperty(value = "排序")
    private Integer productSort;

    @ApiModelProperty(value = "赠送积分")
    private Integer bonusPoints;

    @ApiModelProperty(value = "赠送成长值")
    private Integer bonusGrowth;

    @ApiModelProperty(value = "积分购买限制")
    private Integer pointsPurchase;

    @ApiModelProperty(value = "预告商品 0-是 1-否，默认为：")
    private Integer isAdvance;

    @ApiModelProperty(value = "是否上架 0-是 1-否")
    private Integer isPutaway;

    @ApiModelProperty(value = "是否新品 0-是 1-否")
    private Integer isNew;

    @ApiModelProperty(value = "是否推荐 0-是 1-否")
    private Integer isRecommend;

    @ApiModelProperty(value = "详细页标题")
    private String detailTitle;

    @ApiModelProperty(value = "详细页描述")
    private String detailDescribe;

    @ApiModelProperty(value = "商品关键字")
    private String detailKeyWord;

    @ApiModelProperty(value = "商品备注")
    private String detailRemark;

    @ApiModelProperty(value = "优惠方式类型 详情见字典表offers_type，默认为0 不优惠")
    private Integer offersType;

    @ApiModelProperty(value = "优惠ID")
    private Integer offersId;

    @ApiModelProperty(value = "阶梯价格，当offersType为xxx时必传")
    @Valid
    private List<ShopLadderVo> shopLadders;

    //TODO 补全其他两种优惠方式

    @ApiModelProperty(value = "商品分类ID")
    private Integer productTypeId;

    @ApiModelProperty(value = "商品详情PC端")
    private String pcProductDetail;

    @ApiModelProperty(value = "商品详情移动端")
    private String mobileProductDetail;

    @ApiModelProperty(value = "服务保证,参考字典值service_guarantee")
    private List<Integer> serviceGuaranteeList;

    @ApiModelProperty(value = "商品相册，传图片url集合")
    private List<String> productImages;

    @ApiModelProperty(value = "商品SKU集合")
    @NotEmpty(message = "商品SKU集合不能为空")
    private List<ProductSkuVo> productSkuList;

    @ApiModelProperty(value = "属性图片")
    private List<AttrImageReq> attrImages;

    /*@ApiModelProperty(value = "商品参数,key为参数id，value为参数值")
    private HashMap<String,Object> productParams;*/
}
